namespace SilverSea.Registration
{
    using SilverSea.Registration.Properties;
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Windows.Forms;
    using System.Resources;

    public class frmRegistration : Form
    {
        private Button btnClose;
        private Button btnCoppyUserCode;
        private Button btnDemo;
        private Button btnLicenseAgreement;
        private Button btnPasteActivationKey;
        private Button btnRegister;
        private IContainer components;
        private GroupBox groupBoxTry;
        private GroupBox grpRegister;
        private Label label1;
        private Label label10;
        private Label label11;
        private Label label12;
        private Label label2;
        private Label label3;
        private Label label4;
        private Label label5;
        private Label label6;
        private Label label7;
        private Label label8;
        private Label label9;
        private Label labelActivationKey;
        private Label labelDay;
        private Label labelDayDemo;
        private Label labelDayRemain;
        private Label labelDayRemainNumber;
        private Label labelRegistered;
        private Label labelUserCode;
        private LinkLabel lnkRegister;
        private Panel panel1;
        private PictureBox pictureBox1;
        private SerialBox serialBoxActivationKey;
        private SerialBox serialBoxUserCode;

        public frmRegistration()
        {
            this.InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            base.Close();
        }

        private void btnCoppyUserCode_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(this.serialBoxUserCode.TextToClipBoard);
        }

        private void btnDemo_Click(object sender, EventArgs e)
        {
            base.DialogResult = DialogResult.Retry;
        }

        private void btnLicenseAgreement_Click(object sender, EventArgs e)
        {
            try
            {
                Process.Start(Application.StartupPath + @"\SilverSeaSoftwareLicense.rtf");
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }

        private void btnPasteActivationKey_Click(object sender, EventArgs e)
        {
            string str = CryptorEngine.RemoveUseLess(Clipboard.GetText());
            if ((str != "") && (str.Length == 40))
            {
                this.serialBoxActivationKey.Text = str;
            }
        }

        private void btnRegister_Click(object sender, EventArgs e)
        {
            if (Author.IsGenuine(this.serialBoxUserCode.Text, this.serialBoxActivationKey.Text))
            if (true)
            {
                MessageBox.Show("Đ\x00e3 đăng k\x00fd th\x00e0nh c\x00f4ng", "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                base.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show("Đăng k\x00fd kh\x00f4ng th\x00e0nh c\x00f4ng", "Th\x00f4ng b\x00e1o", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void frmRegister_Load(object sender, EventArgs e)
        {
            this.serialBoxUserCode.ReadOnly = true;
            base.ActiveControl = this.serialBoxActivationKey;
        }

        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmRegistration));
            this.grpRegister = new System.Windows.Forms.GroupBox();
            this.btnCoppyUserCode = new System.Windows.Forms.Button();
            this.btnPasteActivationKey = new System.Windows.Forms.Button();
            this.label11 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.label12 = new System.Windows.Forms.Label();
            this.label9 = new System.Windows.Forms.Label();
            this.serialBoxActivationKey = new SilverSea.Registration.SerialBox();
            this.serialBoxUserCode = new SilverSea.Registration.SerialBox();
            this.lnkRegister = new System.Windows.Forms.LinkLabel();
            this.label10 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.label8 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.labelActivationKey = new System.Windows.Forms.Label();
            this.btnRegister = new System.Windows.Forms.Button();
            this.labelUserCode = new System.Windows.Forms.Label();
            this.btnClose = new System.Windows.Forms.Button();
            this.btnDemo = new System.Windows.Forms.Button();
            this.groupBoxTry = new System.Windows.Forms.GroupBox();
            this.label6 = new System.Windows.Forms.Label();
            this.labelDayDemo = new System.Windows.Forms.Label();
            this.labelDay = new System.Windows.Forms.Label();
            this.labelDayRemain = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.labelDayRemainNumber = new System.Windows.Forms.Label();
            this.labelRegistered = new System.Windows.Forms.Label();
            this.btnLicenseAgreement = new System.Windows.Forms.Button();
            this.panel1 = new System.Windows.Forms.Panel();
            this.grpRegister.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.groupBoxTry.SuspendLayout();
            this.SuspendLayout();
            // 
            // grpRegister
            // 
            this.grpRegister.Controls.Add(this.btnCoppyUserCode);
            this.grpRegister.Controls.Add(this.btnPasteActivationKey);
            this.grpRegister.Controls.Add(this.label11);
            this.grpRegister.Controls.Add(this.label4);
            this.grpRegister.Controls.Add(this.pictureBox1);
            this.grpRegister.Controls.Add(this.label12);
            this.grpRegister.Controls.Add(this.label9);
            this.grpRegister.Controls.Add(this.serialBoxActivationKey);
            this.grpRegister.Controls.Add(this.serialBoxUserCode);
            this.grpRegister.Controls.Add(this.lnkRegister);
            this.grpRegister.Controls.Add(this.label10);
            this.grpRegister.Controls.Add(this.label7);
            this.grpRegister.Controls.Add(this.label8);
            this.grpRegister.Controls.Add(this.label3);
            this.grpRegister.Controls.Add(this.label2);
            this.grpRegister.Controls.Add(this.label1);
            this.grpRegister.Controls.Add(this.labelActivationKey);
            this.grpRegister.Controls.Add(this.btnRegister);
            this.grpRegister.Controls.Add(this.labelUserCode);
            this.grpRegister.Location = new System.Drawing.Point(11, 13);
            this.grpRegister.Margin = new System.Windows.Forms.Padding(4);
            this.grpRegister.Name = "grpRegister";
            this.grpRegister.Padding = new System.Windows.Forms.Padding(4);
            this.grpRegister.Size = new System.Drawing.Size(643, 280);
            this.grpRegister.TabIndex = 0;
            this.grpRegister.TabStop = false;
            this.grpRegister.Text = "Đăng ký sử dụng";
            // 
            // btnCoppyUserCode
            // 
            this.btnCoppyUserCode.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.btnCoppyUserCode.Location = new System.Drawing.Point(555, 50);
            this.btnCoppyUserCode.Margin = new System.Windows.Forms.Padding(4);
            this.btnCoppyUserCode.Name = "btnCoppyUserCode";
            this.btnCoppyUserCode.Size = new System.Drawing.Size(76, 25);
            this.btnCoppyUserCode.TabIndex = 3;
            this.btnCoppyUserCode.Text = "Coppy";
            this.btnCoppyUserCode.UseVisualStyleBackColor = true;
            this.btnCoppyUserCode.Click += new System.EventHandler(this.btnCoppyUserCode_Click);
            // 
            // btnPasteActivationKey
            // 
            this.btnPasteActivationKey.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.btnPasteActivationKey.Location = new System.Drawing.Point(555, 126);
            this.btnPasteActivationKey.Margin = new System.Windows.Forms.Padding(4);
            this.btnPasteActivationKey.Name = "btnPasteActivationKey";
            this.btnPasteActivationKey.Size = new System.Drawing.Size(76, 25);
            this.btnPasteActivationKey.TabIndex = 7;
            this.btnPasteActivationKey.Text = "Paste";
            this.btnPasteActivationKey.UseVisualStyleBackColor = true;
            this.btnPasteActivationKey.Click += new System.EventHandler(this.btnPasteActivationKey_Click);
            // 
            // label11
            // 
            this.label11.AutoSize = true;
            this.label11.ForeColor = System.Drawing.Color.Red;
            this.label11.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label11.Location = new System.Drawing.Point(96, 181);
            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(60, 16);
            this.label11.TabIndex = 28;
            this.label11.Text = "Website:";
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(47, 104);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(281, 16);
            this.label4.TabIndex = 27;
            this.label4.Text = "(Lưu lại Activation Key này cho lần cài đặt sau)";
            // 
            // pictureBox1
            // 
            this.pictureBox1.BackColor = System.Drawing.SystemColors.ActiveBorder;
            this.pictureBox1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.pictureBox1.Location = new System.Drawing.Point(9, 158);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(625, 2);
            this.pictureBox1.TabIndex = 25;
            this.pictureBox1.TabStop = false;
            // 
            // label12
            // 
            this.label12.AutoSize = true;
            this.label12.ForeColor = System.Drawing.SystemColors.ControlText;
            this.label12.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label12.Location = new System.Drawing.Point(6, 85);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(457, 16);
            this.label12.TabIndex = 4;
            this.label12.Text = "Bước 2: Điền vào \"Activation Key\" mà nguyentoanit@gmail.com gửi cho bạn.";
            // 
            // label9
            // 
            this.label9.AutoSize = true;
            this.label9.ForeColor = System.Drawing.SystemColors.ControlText;
            this.label9.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label9.Location = new System.Drawing.Point(6, 30);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(550, 16);
            this.label9.TabIndex = 0;
            this.label9.Text = "Bước 1: Gửi \"User Code\" dưới đây cho người thiết kế phần mềm (nguyentoanit@g" +
                "mail.com)";
            // 
            // serialBoxActivationKey
            // 
            this.serialBoxActivationKey.Font = new System.Drawing.Font("Arial", 8.25F);
            this.serialBoxActivationKey.Location = new System.Drawing.Point(100, 125);
            this.serialBoxActivationKey.Margin = new System.Windows.Forms.Padding(4);
            this.serialBoxActivationKey.Name = "serialBoxActivationKey";
            this.serialBoxActivationKey.Size = new System.Drawing.Size(463, 26);
            this.serialBoxActivationKey.TabIndex = 6;
            // 
            // serialBoxUserCode
            // 
            this.serialBoxUserCode.Font = new System.Drawing.Font("Arial", 8.25F);
            this.serialBoxUserCode.Location = new System.Drawing.Point(100, 50);
            this.serialBoxUserCode.Margin = new System.Windows.Forms.Padding(4);
            this.serialBoxUserCode.Name = "serialBoxUserCode";
            this.serialBoxUserCode.Size = new System.Drawing.Size(463, 26);
            this.serialBoxUserCode.TabIndex = 2;
            // 
            // lnkRegister
            // 
            this.lnkRegister.AutoSize = true;
            this.lnkRegister.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.lnkRegister.Location = new System.Drawing.Point(174, 181);
            this.lnkRegister.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.lnkRegister.Name = "lnkRegister";
            this.lnkRegister.Size = new System.Drawing.Size(105, 16);
            this.lnkRegister.TabIndex = 9;
            this.lnkRegister.TabStop = true;
            this.lnkRegister.Text = "http://www.byf.vn";
            this.lnkRegister.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkRegister_LinkClicked);
            // 
            // label10
            // 
            this.label10.AutoSize = true;
            this.label10.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label10.Location = new System.Drawing.Point(5, 181);
            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(97, 16);
            this.label10.TabIndex = 8;
            this.label10.Text = "Đăng ký Online";
            // 
            // label7
            // 
            this.label7.AutoSize = true;
            this.label7.ForeColor = System.Drawing.Color.Blue;
            this.label7.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label7.Location = new System.Drawing.Point(172, 231);
            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(155, 16);
            this.label7.TabIndex = 14;
            this.label7.Text = "nguyentoanit@gmail.com";
            // 
            // label8
            // 
            this.label8.AutoSize = true;
            this.label8.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label8.Location = new System.Drawing.Point(5, 208);
            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(50, 16);
            this.label8.TabIndex = 10;
            this.label8.Text = "Liên hệ";
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.ForeColor = System.Drawing.Color.Blue;
            this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label3.Location = new System.Drawing.Point(172, 208);
            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(90, 16);
            this.label3.TabIndex = 12;
            this.label3.Text = "0912.66.12.79";
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.ForeColor = System.Drawing.Color.Red;
            this.label2.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label2.Location = new System.Drawing.Point(96, 231);
            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(45, 16);
            this.label2.TabIndex = 13;
            this.label2.Text = "Email:";
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.Red;
            this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label1.Location = new System.Drawing.Point(96, 208);
            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(70, 16);
            this.label1.TabIndex = 11;
            this.label1.Text = "Điện thoại:";
            // 
            // labelActivationKey
            // 
            this.labelActivationKey.AutoSize = true;
            this.labelActivationKey.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold);
            this.labelActivationKey.ForeColor = System.Drawing.Color.Blue;
            this.labelActivationKey.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelActivationKey.Location = new System.Drawing.Point(6, 130);
            this.labelActivationKey.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelActivationKey.Name = "labelActivationKey";
            this.labelActivationKey.Size = new System.Drawing.Size(99, 16);
            this.labelActivationKey.TabIndex = 5;
            this.labelActivationKey.Text = "Activation Key";
            this.labelActivationKey.DoubleClick += new System.EventHandler(this.labelActivationKey_DoubleClick);
            // 
            // btnRegister
            // 
            this.btnRegister.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold);
            this.btnRegister.ForeColor = System.Drawing.Color.Blue;
            this.btnRegister.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.btnRegister.Location = new System.Drawing.Point(543, 240);
            this.btnRegister.Margin = new System.Windows.Forms.Padding(4);
            this.btnRegister.Name = "btnRegister";
            this.btnRegister.Size = new System.Drawing.Size(88, 28);
            this.btnRegister.TabIndex = 17;
            this.btnRegister.Text = "Đăng ký";
            this.btnRegister.UseVisualStyleBackColor = true;
            this.btnRegister.Click += new System.EventHandler(this.btnRegister_Click);
            // 
            // labelUserCode
            // 
            this.labelUserCode.AutoSize = true;
            this.labelUserCode.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold);
            this.labelUserCode.ForeColor = System.Drawing.Color.Blue;
            this.labelUserCode.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelUserCode.Location = new System.Drawing.Point(6, 55);
            this.labelUserCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelUserCode.Name = "labelUserCode";
            this.labelUserCode.Size = new System.Drawing.Size(73, 16);
            this.labelUserCode.TabIndex = 1;
            this.labelUserCode.Text = "User Code";
            this.labelUserCode.DoubleClick += new System.EventHandler(this.labelUserCode_DoubleClick);
            // 
            // btnClose
            // 
            this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.btnClose.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.btnClose.Location = new System.Drawing.Point(566, 427);
            this.btnClose.Margin = new System.Windows.Forms.Padding(4);
            this.btnClose.Name = "btnClose";
            this.btnClose.Size = new System.Drawing.Size(88, 28);
            this.btnClose.TabIndex = 4;
            this.btnClose.Text = "Đóng";
            this.btnClose.UseVisualStyleBackColor = true;
            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
            // 
            // btnDemo
            // 
            this.btnDemo.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold);
            this.btnDemo.ForeColor = System.Drawing.Color.Blue;
            this.btnDemo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.btnDemo.Location = new System.Drawing.Point(543, 73);
            this.btnDemo.Margin = new System.Windows.Forms.Padding(4);
            this.btnDemo.Name = "btnDemo";
            this.btnDemo.Size = new System.Drawing.Size(88, 28);
            this.btnDemo.TabIndex = 6;
            this.btnDemo.Text = "Dùng thử";
            this.btnDemo.UseVisualStyleBackColor = true;
            this.btnDemo.Click += new System.EventHandler(this.btnDemo_Click);
            // 
            // groupBoxTry
            // 
            this.groupBoxTry.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)));
            this.groupBoxTry.Controls.Add(this.label6);
            this.groupBoxTry.Controls.Add(this.labelDayDemo);
            this.groupBoxTry.Controls.Add(this.labelDay);
            this.groupBoxTry.Controls.Add(this.labelDayRemain);
            this.groupBoxTry.Controls.Add(this.label5);
            this.groupBoxTry.Controls.Add(this.btnDemo);
            this.groupBoxTry.Controls.Add(this.labelDayRemainNumber);
            this.groupBoxTry.Location = new System.Drawing.Point(11, 301);
            this.groupBoxTry.Margin = new System.Windows.Forms.Padding(4);
            this.groupBoxTry.Name = "groupBoxTry";
            this.groupBoxTry.Padding = new System.Windows.Forms.Padding(4);
            this.groupBoxTry.Size = new System.Drawing.Size(643, 113);
            this.groupBoxTry.TabIndex = 1;
            this.groupBoxTry.TabStop = false;
            this.groupBoxTry.Text = "Dùng thử";
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label6.Location = new System.Drawing.Point(310, 24);
            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(44, 16);
            this.label6.TabIndex = 2;
            this.label6.Text = "(ngày)";
            // 
            // labelDayDemo
            // 
            this.labelDayDemo.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold);
            this.labelDayDemo.ForeColor = System.Drawing.Color.Red;
            this.labelDayDemo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelDayDemo.Location = new System.Drawing.Point(287, 25);
            this.labelDayDemo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelDayDemo.Name = "labelDayDemo";
            this.labelDayDemo.Size = new System.Drawing.Size(25, 16);
            this.labelDayDemo.TabIndex = 1;
            this.labelDayDemo.Text = "30";
            this.labelDayDemo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // labelDay
            // 
            this.labelDay.AutoSize = true;
            this.labelDay.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelDay.Location = new System.Drawing.Point(190, 82);
            this.labelDay.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelDay.Name = "labelDay";
            this.labelDay.Size = new System.Drawing.Size(44, 16);
            this.labelDay.TabIndex = 5;
            this.labelDay.Text = "(ngày)";
            // 
            // labelDayRemain
            // 
            this.labelDayRemain.AutoSize = true;
            this.labelDayRemain.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelDayRemain.Location = new System.Drawing.Point(7, 82);
            this.labelDayRemain.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelDayRemain.Name = "labelDayRemain";
            this.labelDayRemain.Size = new System.Drawing.Size(164, 16);
            this.labelDayRemain.TabIndex = 3;
            this.labelDayRemain.Text = "Thời gian dùng thử còn lại:";
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.label5.Location = new System.Drawing.Point(7, 24);
            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(420, 48);
            this.label5.TabIndex = 0;
            this.label5.Text = "Bạn được thử sử dụng chương trình này trong: \r\nSau thời gian dùng thử nếu bạn khô" +
                "ng đăng ký sử dụng, chương trình \r\nsẽ không hoạt động được.";
            // 
            // labelDayRemainNumber
            // 
            this.labelDayRemainNumber.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold);
            this.labelDayRemainNumber.ForeColor = System.Drawing.Color.Red;
            this.labelDayRemainNumber.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelDayRemainNumber.Location = new System.Drawing.Point(160, 82);
            this.labelDayRemainNumber.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelDayRemainNumber.Name = "labelDayRemainNumber";
            this.labelDayRemainNumber.Size = new System.Drawing.Size(35, 16);
            this.labelDayRemainNumber.TabIndex = 4;
            this.labelDayRemainNumber.Text = "30";
            this.labelDayRemainNumber.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            // 
            // labelRegistered
            // 
            this.labelRegistered.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.labelRegistered.AutoSize = true;
            this.labelRegistered.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.labelRegistered.Location = new System.Drawing.Point(9, 433);
            this.labelRegistered.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
            this.labelRegistered.Name = "labelRegistered";
            this.labelRegistered.Size = new System.Drawing.Size(227, 16);
            this.labelRegistered.TabIndex = 2;
            this.labelRegistered.Text = "Phần mềm đã được đăng ký sử dụng";
            this.labelRegistered.Visible = false;
            // 
            // btnLicenseAgreement
            // 
            this.btnLicenseAgreement.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.btnLicenseAgreement.ImeMode = System.Windows.Forms.ImeMode.NoControl;
            this.btnLicenseAgreement.Location = new System.Drawing.Point(402, 427);
            this.btnLicenseAgreement.Margin = new System.Windows.Forms.Padding(4);
            this.btnLicenseAgreement.Name = "btnLicenseAgreement";
            this.btnLicenseAgreement.Size = new System.Drawing.Size(157, 28);
            this.btnLicenseAgreement.TabIndex = 3;
            this.btnLicenseAgreement.Text = "Thỏa thuận bản quyền";
            this.btnLicenseAgreement.UseVisualStyleBackColor = true;
            this.btnLicenseAgreement.Visible = false;
            this.btnLicenseAgreement.Click += new System.EventHandler(this.btnLicenseAgreement_Click);
            // 
            // panel1
            // 
            this.panel1.Location = new System.Drawing.Point(154, 1);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(34, 18);
            this.panel1.TabIndex = 5;
            this.panel1.DoubleClick += new System.EventHandler(this.panel1_DoubleClick);
            // 
            // frmRegistration
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.White;
            this.ClientSize = new System.Drawing.Size(663, 468);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.labelRegistered);
            this.Controls.Add(this.groupBoxTry);
            this.Controls.Add(this.grpRegister);
            this.Controls.Add(this.btnClose);
            this.Controls.Add(this.btnLicenseAgreement);
            this.Font = new System.Drawing.Font("Arial", 9.75F);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Margin = new System.Windows.Forms.Padding(4);
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "frmRegistration";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Đăng ký sử dụng chương trình";
            this.Load += new System.EventHandler(this.frmRegister_Load);
            this.grpRegister.ResumeLayout(false);
            this.grpRegister.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.groupBoxTry.ResumeLayout(false);
            this.groupBoxTry.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void labelActivationKey_DoubleClick(object sender, EventArgs e)
        {
        }

        private void labelUserCode_DoubleClick(object sender, EventArgs e)
        {
            frmSecurityLogin login = new frmSecurityLogin();
            if (login.ShowDialog() == DialogResult.OK)
            {
                this.serialBoxUserCode.ReadOnly = false;
            }
        }

        private void lnkRegister_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            this.lnkRegister.LinkVisited = true;
            Process.Start("http://www.silversea.vn");
        }

        private void panel1_DoubleClick(object sender, EventArgs e)
        {
            frmSecurityLogin login = new frmSecurityLogin();
            if (login.ShowDialog() == DialogResult.OK)
            {
                this.serialBoxActivationKey.Text = Author.GetActivationKey(this.serialBoxUserCode.Text);
            }
        }

        public string ActivationKey
        {
            get
            {
                return this.serialBoxActivationKey.Text;
            }
            set
            {
                this.serialBoxActivationKey.Text = value;
                if (Author.IsGenuine(this.serialBoxUserCode.Text, this.serialBoxActivationKey.Text))
                {
                    this.btnRegister.Visible = false;
                    this.labelRegistered.Visible = true;
                }
            }
        }

        public int DayDemo
        {
            get
            {
                return Convert.ToInt32(this.labelDayDemo.Text);
            }
            set
            {
                this.labelDayDemo.Text = value.ToString();
            }
        }

        public int DayRemain
        {
            get
            {
                return Convert.ToInt32(this.labelDayRemainNumber.Text);
            }
            set
            {
                if (value > 0)
                {
                    this.labelDayRemainNumber.Text = value.ToString();
                }
                else
                {
                    this.labelDayRemain.Text = "Đ\x00e3 hết hạn d\x00f9ng thử.";
                    this.labelDayRemainNumber.Text = "";
                    this.labelDay.Text = "";
                    this.btnDemo.Enabled = false;
                }
            }
        }

        public bool HideDemoButton
        {
            set
            {
                if (value)
                {
                    this.groupBoxTry.Visible = false;
                    base.Size = new Size(680, 0x17b);
                }
            }
        }

        public string UserCode
        {
            get
            {
                return this.serialBoxUserCode.Text;
            }
            set
            {
                this.serialBoxUserCode.Text = value;
                if (Author.IsGenuine(this.serialBoxUserCode.Text, this.serialBoxActivationKey.Text))
                {
                    this.btnRegister.Visible = false;
                    this.labelRegistered.Visible = true;
                }
            }
        }
    }
}

